package com.digitalchina.lxnsy.sy.jibingzhiliao;

import android.webkit.JavascriptInterface;

import com.digitalchina.lxnsy.base.BaseHtmlActivity;
import com.digitalchina.lxnsy.sy.shengzhang.AddCheckEarTag2dActivity;
import com.digitalchina.lxnsy.sy.siwei.SelectProductsActivity;


public class AddDiseaseRecordActivity extends BaseHtmlActivity {
    private int tag = 0;

    @Override
    protected void loadHtml() {
        webView.addJavascriptObject(new JsApi(), null);

        loadUrl("addDiseaseRecord");
        callJsMethod("refresh");

        setTitle("新增疾病诊疗记录");

    }


    @Override
    public void onResume() {
        super.onResume();
        if (tag > 0) {
            callJsMethod("refresh");
        }
        tag++;

    }

    @Override
    public void rightOnClick() {



    }


    public class JsApi {


        @JavascriptInterface
        public void addCheckEarTag2d(Object msg) {
            go(AddCheckEarTag2dActivity.class);

        }

        @JavascriptInterface
        public void selectProducts(Object msg) {
            go(SelectProductsActivity.class);

        }


        @JavascriptInterface
        public void selectProductsFzm2(Object msg) {
            go(SelectProductsFzm2Activity.class);

        }

    }
}
